package com.dyava.dycache.core;

import java.lang.reflect.Type;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 缓存定义
 */
public class CacheDefined {
	/** name */
	String name;
	/** type类型 */
	Type type; //因为很多结果是 List<实体>  所以反射只能用Type 不能用Class
	/**有无版本机制*/
	boolean hasVersion;
	/** 有效期 毫秒 多级缓存按顺序设置 */
	int[] expires;


	public CacheDefined() {
 	}

	public CacheDefined(String name, Type type, boolean hasVersion, int[] expires) {
		this.name = name;
		this.type = type;
		this.hasVersion = hasVersion;
		this.expires = expires;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public boolean isHasVersion() {
		return hasVersion;
	}

	public void setHasVersion(boolean hasVersion) {
		this.hasVersion = hasVersion;
	}

	public int[] getExpires() {
		return expires;
	}

	public void setExpires(int[] expires) {
		this.expires = expires;
	}


}
